package com.atguigu.gulimall.member.service;

import com.atguigu.common.to.member.SocialUserTo;
import com.atguigu.gulimall.member.exception.PhoneExistException;
import com.atguigu.gulimall.member.exception.UserNameExistException;
import com.atguigu.gulimall.member.vo.UserLoginVo;
import com.atguigu.gulimall.member.vo.UserRegisterVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;
import me.zhyd.oauth.model.AuthUser;

import java.util.Map;

/**
 * 会员
 *
 * @author zhough
 * @email zhough@gmail.com
 * @date 2024-01-22 20:23:32
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(UserRegisterVo vo);

    boolean checkPhoneIsUnique(String phone) throws PhoneExistException;

    boolean checkUserNameIsUnique(String userName) throws UserNameExistException;

    MemberEntity login(UserLoginVo vo);

    MemberEntity oauth2WebiBoLogin(SocialUserTo to);

    MemberEntity oauth2Login(AuthUser to);
}

